package com.gskj.canal;

import com.gskj.canal.client.CanalClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.*;
import java.nio.Buffer;
import java.util.zip.GZIPOutputStream;

/**
 * @author : Connor-G 康纳-郭
 * @date : 09:36 20.9.22
 * @Company : http://www.gskj.club
 * @Version : 1.0
 */

@SpringBootApplication
public class CanalApplication implements CommandLineRunner {
    @Autowired
    private CanalClient canalClient;


    public static void main(String[] args){
        SpringApplication.run(CanalApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {

        System.out.println(canalClient);
        // 项目启动，执行canal客户端监听
        canalClient.run();
    }
}
